<%@ page import="yc.day0109.lottery.po.User" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>
<%@ page import="yc.day0109.lottery.dao.impl.UserDaoImpl" %>
<%@ page import="yc.day0109.lottery.dao.UserDao" %><%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2023/1/10
  Time: 9:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%-- 指定jstl标签前缀，引用uri --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>--%>
<html>
<head>
    <title>EL表达使用</title>
</head>
<body>
<div>
    <c:out value="jstl标签库使用out输出"></c:out>
    <table id="table" class="last">
        <tr>
            <th>姓名</th>
            <th>中签编码</th>
            <th>持照状态</th>
            <th>手机号码</th>
            <th>开户日期</th>
            <th>操作</th>
        </tr>
        <%--    jstl迭代标签(c:forEach)    --%>
        <c:forEach items="${userList}" var="list" varStatus="vs">
            <%--      使用jstl中的foreach迭代标签库中varStatus状态属性实现隔行换色      --%>
            <tr <c:if test="${vs.index % 2 == 0}">style="background-color: lightblue;" </c:if>>
<%--                <td>count:${vs.count}|index:${vs.index}</td>--%>
                <td>${list.userName}</td>
                <td>${list.markNo}</td>
<%--                <td>${list.status}</td>--%>
                <td <c:if test="${list.status eq 1}">style="color: red;" </c:if>>
<%--                   <c:if test="${list.status eq 0}">未持照</c:if>--%>
<%--                    <c:if test="${list.status eq 1}">已持照</c:if>--%>
                    <c:choose>
                        <c:when test="${list.status eq 0}">未持照</c:when>
                        <c:otherwise>已持照</c:otherwise>
                    </c:choose>
                </td>
                <td>${list.phone}</td>
                <td>${list.openDate}</td>
                <td>
                    <a href="">详情</a>
                    <a href="">删除</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</div>
</body>
</html>
